package 抽象类GeometricFigure及其子类;

public class Square extends GeometricFigure {
    @Override
    public double getArea() {
        return this.side * this.side;
    }

    @Override
    public double getPerimeter() {
        return 4 * this.side;
    }

    private double side;
    public Square(double side){
        this.side = side;
    }

}